<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="../HRTWEB/js/jquery-1.9.1.js"></script>
<script type="text/javascript">
	function vilidate() {
		var pass = document.getElementById("New_password").value;
		var vilidate_pass = document.getElementById("validatePass").value;
		alert("pass:" + pass + "vilidate_pass::" + vilidate_pass);
		if (pass != vilidate_pass) {
			alert("密码不一致");
			return false;
		}
		return true;
	}
	function sentToService() {
		var old = document.getElementById("Old_password").value;
		var id = document.getElementById("memberId").value;
		$.ajax({
			url : "./validate.do",
			type : "POST",
			dataType : "text",
			data : {
				id : id,
				Old_password : old
			},
			success : function(data) {
				alert(data);
			},
			error : function(data) {
				alert(data);
			}
			
		});
	}
</script>
<title>修改密码</title>

</head>
<body>
	<form action="./resetPass.do" method="post" name="resetPassInfo">
		<input id="memberId" type="hidden" name="id" value="${HRTMember.id}" />
		<table>
			<tr>
				<td>输入原密码：</td>
				<td><input type="password" name="Old_password"
					id="Old_password" onchange="sentToService();" /></td>
			</tr>
			<tr>
				<td>新密码：</td>
				<td><input type="password" name="New_password"
					id="New_password" /></td>
			</tr>
			<tr>
				<td>确认密码：</td>
				<td><input type="password" name="validatePass"
					id="validatePass" /></td>
			</tr>
			<tr>
				<td><input type="reset" /></td>
				<td><input type="submit" value="保存" onclick="return vilidate()" /></td>
			</tr>
		</table>
	</form>
</body>
</html>